projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe9df4b
)
(Fchar_to_string): If CHARACTER is less than 256,
author
Kenichi Handa
<handa@m17n.org>
Fri, 9 Feb 2001 05:32:46 +0000
(
05:32
+0000)
committer
Kenichi Handa
<handa@m17n.org>
Fri, 9 Feb 2001 05:32:46 +0000
(
05:32
+0000)
return a unibyte string.
src/editfns.c
patch
|
blob
|
history
diff --git
a/src/editfns.c
b/src/editfns.c
index bf65c0a86d554467b45c527acf36bcb53dfd17e4..2f5e3f711ea4000db46089a6fe4448827372ac6d 100644
(file)
--- a/
src/editfns.c
+++ b/
src/editfns.c
@@
-167,7
+167,9
@@
DEFUN ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0,
CHECK_NUMBER (character, 0);
- len = CHAR_STRING (XFASTINT (character), str);
+ len = (SINGLE_BYTE_CHAR_P (XFASTINT (character))
+ ? (*str = (unsigned char)(XFASTINT (character)), 1)
+ : char_to_string (XFASTINT (character), str));
return make_string_from_bytes (str, 1, len);
}